Integrand size = 25, antiderivative size = 77 \[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {2 (5 A+3 C) \sqrt {b \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 d \sqrt {\cos (c+d x)}}+\frac {2 C (b \cos (c+d x))^{3/2} \sin (c+d x)}{5 b d} \]
2/5*C*(b*cos(d*x+c))^(3/2)*sin(d*x+c)/b/d+2/5*(5*A+3*C)*(cos(1/2*d*x+1/2*c )^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))*(b*cos (d*x+c))^(1/2)/d/cos(d*x+c)^(1/2)
Time = 0.07 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.91 \[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {\sqrt {b \cos (c+d x)} \left (2 (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+C \sqrt {\cos (c+d x)} \sin (2 (c+d x))\right )}{5 d \sqrt {\cos (c+d x)}} \]
(Sqrt[b*Cos[c + d*x]]*(2*(5*A + 3*C)*EllipticE[(c + d*x)/2, 2] + C*Sqrt[Co s[c + d*x]]*Sin[2*(c + d*x)]))/(5*d*Sqrt[Cos[c + d*x]])
Time = 0.35 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3042, 3493, 3042, 3121, 3042, 3119}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {b \sin \left (c+d x+\frac {\pi }{2}\right )} \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3493 |
\(\displaystyle \frac {1}{5} (5 A+3 C) \int \sqrt {b \cos (c+d x)}dx+\frac {2 C \sin (c+d x) (b \cos (c+d x))^{3/2}}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{5} (5 A+3 C) \int \sqrt {b \sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {2 C \sin (c+d x) (b \cos (c+d x))^{3/2}}{5 b d}\) |
\(\Big \downarrow \) 3121 |
\(\displaystyle \frac {(5 A+3 C) \sqrt {b \cos (c+d x)} \int \sqrt {\cos (c+d x)}dx}{5 \sqrt {\cos (c+d x)}}+\frac {2 C \sin (c+d x) (b \cos (c+d x))^{3/2}}{5 b d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(5 A+3 C) \sqrt {b \cos (c+d x)} \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{5 \sqrt {\cos (c+d x)}}+\frac {2 C \sin (c+d x) (b \cos (c+d x))^{3/2}}{5 b d}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {2 (5 A+3 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {b \cos (c+d x)}}{5 d \sqrt {\cos (c+d x)}}+\frac {2 C \sin (c+d x) (b \cos (c+d x))^{3/2}}{5 b d}\) |
(2*(5*A + 3*C)*Sqrt[b*Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2])/(5*d*Sqrt[C os[c + d*x]]) + (2*C*(b*Cos[c + d*x])^(3/2)*Sin[c + d*x])/(5*b*d)
3.1.39.3.1 Defintions of rubi rules used
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[((b_)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*Sin[c + d*x]) ^n/Sin[c + d*x]^n Int[Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && Lt Q[-1, n, 1] && IntegerQ[2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_) + (C_.)*sin[(e_.) + (f_.)*( x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f *(m + 2))), x] + Simp[(A*(m + 2) + C*(m + 1))/(m + 2) Int[(b*Sin[e + f*x] )^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && !LtQ[m, -1]
Leaf count of result is larger than twice the leaf count of optimal. \(260\) vs. \(2(93)=186\).
Time = 9.48 (sec) , antiderivative size = 261, normalized size of antiderivative = 3.39
method | result | size |
default | \(\frac {2 \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, b \left (8 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) C \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+5 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+2 C \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+3 C \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{5 \sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}\) | \(261\) |
parts | \(\frac {2 A \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, b \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}-\frac {2 C \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, b \left (-8 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, E\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{5 \sqrt {-b \left (2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {\left (2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1\right ) b}\, d}\) | \(355\) |
2/5*((2*cos(1/2*d*x+1/2*c)^2-1)*b*sin(1/2*d*x+1/2*c)^2)^(1/2)*b*(8*cos(1/2 *d*x+1/2*c)*C*sin(1/2*d*x+1/2*c)^6-8*C*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2* c)^4+5*A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*Ell ipticE(cos(1/2*d*x+1/2*c),2^(1/2))+2*C*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2* c)^2+3*C*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*Ell ipticE(cos(1/2*d*x+1/2*c),2^(1/2)))/(-b*(2*sin(1/2*d*x+1/2*c)^4-sin(1/2*d* x+1/2*c)^2))^(1/2)/sin(1/2*d*x+1/2*c)/((2*cos(1/2*d*x+1/2*c)^2-1)*b)^(1/2) /d
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.09 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.31 \[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\frac {2 \, \sqrt {b \cos \left (d x + c\right )} C \cos \left (d x + c\right ) \sin \left (d x + c\right ) + \sqrt {2} {\left (5 i \, A + 3 i \, C\right )} \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + \sqrt {2} {\left (-5 i \, A - 3 i \, C\right )} \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{5 \, d} \]
1/5*(2*sqrt(b*cos(d*x + c))*C*cos(d*x + c)*sin(d*x + c) + sqrt(2)*(5*I*A + 3*I*C)*sqrt(b)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + sqrt(2)*(-5*I*A - 3*I*C)*sqrt(b)*weierstrassZeta (-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))))/d
Timed out. \[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\text {Timed out} \]
\[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + A\right )} \sqrt {b \cos \left (d x + c\right )} \,d x } \]
\[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\int { {\left (C \cos \left (d x + c\right )^{2} + A\right )} \sqrt {b \cos \left (d x + c\right )} \,d x } \]
Timed out. \[ \int \sqrt {b \cos (c+d x)} \left (A+C \cos ^2(c+d x)\right ) \, dx=\int \left (C\,{\cos \left (c+d\,x\right )}^2+A\right )\,\sqrt {b\,\cos \left (c+d\,x\right )} \,d x \]